package DeviceType

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type DeviceTypeRouter struct {
}

// InitDeviceTypeRouter 初始化 DeviceType 路由信息
func (s *DeviceTypeRouter) InitDeviceTypeRouter(Router *gin.RouterGroup) {
	deviceTypeRouter := Router.Group("deviceType").Use(middleware.OperationRecord())
	deviceTypeRouterWithoutRecord := Router.Group("deviceType")
	var deviceTypeApi = v1.ApiGroupApp.DeviceTypeApiGroup.DeviceTypeApi
	{
		deviceTypeRouter.POST("createDeviceType", deviceTypeApi.CreateDeviceType)             // 新建DeviceType
		deviceTypeRouter.DELETE("deleteDeviceType", deviceTypeApi.DeleteDeviceType)           // 删除DeviceType
		deviceTypeRouter.DELETE("deleteDeviceTypeByIds", deviceTypeApi.DeleteDeviceTypeByIds) // 批量删除DeviceType
		deviceTypeRouter.PUT("updateDeviceType", deviceTypeApi.UpdateDeviceType)              // 更新DeviceType
	}
	{
		deviceTypeRouterWithoutRecord.GET("findDeviceType", deviceTypeApi.FindDeviceType)       // 根据ID获取DeviceType
		deviceTypeRouterWithoutRecord.GET("getDeviceTypeList", deviceTypeApi.GetDeviceTypeList) // 获取DeviceType列表
	}
}
